home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / sun / volume2 / contool3.0 / part03 < prev    next >
Encoding:
Internet Message Format  |  1990-09-25  |  47.1 KB

  1. Path: uunet!snorkelwacker!apple!sun-barr!rutgers!aramis.rutgers.edu!mcgrew
  2. From: mcgrew@aramis.rutgers.edu (Charles Mcgrew)
  3. Newsgroups: comp.sources.sun
  4. Subject: v02i022:  Contool 3.0, Part03/06
  5. Message-ID: <Sep.25.16.11.27.1990.25467@aramis.rutgers.edu>
  6. Date: 25 Sep 90 20:11:29 GMT
  7. Organization: Rutgers Univ., New Brunswick, N.J.
  8. Lines: 935
  9. Approved: mcgrew@aramis.rutgers.edu
  10.  
  11. Submitted-by: chuck@trantor.harris-atd.com (Chuck Musciano)
  12. Posting-number: Volume 2, Issue 22
  13. Archive-name: contool3.0/part03
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 3 (of 6)."
  22. # Contents:  contool.info contool.man props.c
  23. # Wrapped by chuck@melmac on Fri Aug 17 10:00:52 1990
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'contool.info' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'contool.info'\"
  27. else
  28. echo shar: Extracting \"'contool.info'\" \(18660 characters\)
  29. sed "s/^X//" >'contool.info' <<'END_OF_FILE'
  30. X# 
  31. X# contool.info - User interface object help text.
  32. X# This file was generated by `gxv' from `contool.G'.
  33. X# DO NOT EDIT BY HAND.
  34. X# 
  35. X:contool_controls
  36. XThe contool control panel has buttons which let you load and store configuration data, adjust contool's configuration, and create and modify message filters.  Point at the desired button and press the Help key for more information about that set of
  37. functions.
  38. X# 
  39. X:file
  40. XThe File button provides various file-related services to contool users.  The associated menu has five entries.
  41. X
  42. X"Load Configuration" brings up the Load Configuration dialog.
  43. X
  44. X"Store Configuration" brings up the Store Configuration dialog.
  45. X
  46. X"Start Logging" starts logging messages to the log file specified in the Properties dialog.  If logging is already in effect, this menu item is disabled.
  47. X
  48. X"Stop Logging" stops logging.  If logging is not in effect, this menu item is disabled.
  49. X
  50. X"Print" prints the contents of the console use the print filter specified in the Properties dialog. 
  51. X
  52. XThe default action is "Load Configuration".
  53. X# 
  54. X:view
  55. XThe View button provides three contool support functions:
  56. X
  57. X"Become Console" ensures that contool has the system console attribute.  Only one process under SunOS can own the console.  If some other process acquires this attribute, messages will no longer be routed to contool.  This selection will give the console
  58. attribute back to contool.
  59. X
  60. X"Clear Messages" clears the current console messages from the scrolling display.
  61. X
  62. X"Reset Filter" causes contool to stop processing a multi-line filter.  If the user has incorrectly specified the end pattern of a multi-line filter, contool may never stop processing that filter, preventing subsequent messages from being displayed.  This
  63. sleection cancels any multi-line fiter in effect.  If a multi-line filter is being processed, its starting pattern will be displayed in the left footer of the contool window.
  64. X
  65. XThe default selection is "Become Console".
  66. X# 
  67. X:edit
  68. XThe Edit button lets the user edit either the contool properties or the current filter set.
  69. X
  70. XThe "Filters" selection brings up the Filters dialog.
  71. X
  72. XThe "Properties" selection brings up the Properties dialog.
  73. X
  74. XThe default selection is "Filters".
  75. X# 
  76. X:display
  77. XThe contool console display contains the text of those messages which contoolhas been configured to display.  Some messages may be timestamped.  Which messages make it into the console is controlled by the Filters dialog; how many messages are retained is
  78. determined by the Properties dialog.
  79. X# 
  80. X:prop_controls
  81. XThe Properties dialog box lets you modify various default attributes of contool.  These attributes include how to handle messages which do not match any filter, message logging and printing, and icon images.
  82. X# 
  83. X:default_action
  84. XThe Default action setting determines what action contool will take when a message arrives that does not match any filter.
  85. X
  86. XIf "Beep" is selected, the machine bell will be rung the indicated number of times.
  87. X
  88. XIf "Command" is selected, the indicated command will be executed.  The contents of the message are written to the command's standard input.
  89. X
  90. XIf "Flash icon" is selected, contool's icon will flash, alternating between the "Check console" and "Flash" images specified in the contool Properties dialog box.
  91. X
  92. XIf "Open window" is selected, contool will open to a window (if iconic) and move in front of any obscuring windows.
  93. X
  94. XIf "Timestamp" is selected, a timestamp will be written to the console before the message text.  Timestamping is further controlled by the timestamp resolution defined in the contool Properties dialog box.
  95. X
  96. X# 
  97. X:default_beep_count
  98. XThis numeric text field determines the number of times the terminal bell will be rung when a message arrives that does not match any filter.
  99. X
  100. XThis item is only enabled if "Beep" is enabled in the "Default action" setting.
  101. X# 
  102. X:default_beep_times
  103. XThis numeric text field determines the number of times the terminal bell will be rung when a message arrives that does not match any filter.
  104. X
  105. XThis item is only enabled if "Beep" is enabled in the "Default action" setting.
  106. X# 
  107. X:default_command
  108. XThis text field determines the command that will be exedcuted when a message arrives that does not match any filter.  The contents of the message are written to standard input of the executing command.
  109. X
  110. XThis item is only enabled if "Command" is enabled in the "Default action" setting.
  111. X# 
  112. X:log_file
  113. XThe Log file text field contains the path of the file to which messages are written if logging is enabled.
  114. X
  115. XMessages are always appended to the file, preserving any previous contents.
  116. X
  117. XTyping a space in this field will cause file name completion to occur, expanding the current pathname to match, as much as possible, any existing files with the same name.
  118. X# 
  119. X:log_style
  120. XThe Log messages setting determines whether messages will be written to the log before or after filtering.
  121. X
  122. XIf "Before filtering" is selected, everything received by contool is written to the log.
  123. X
  124. XIf "After filtering" is selected, only those messages that do not match any filter, or that match a filter whose match action is to save the message, are written to the log.
  125. X# 
  126. X:print_filter
  127. XThe Print filter text field specifies the command which will be used to print the console when "Print" is selected from the contool "File" menu.
  128. X
  129. XThis command should route its standard input to a printer.
  130. X# 
  131. X:good_icon
  132. XThe "All is well" icon text field should contain the path of a file containing the image to be used by contool when it is not flashing its icon.  The image should have been produced using iconedit(1).
  133. X
  134. XIf this field is blank, the default icon is used.
  135. X# 
  136. X:bad_icon
  137. XThe "Check console" icon text field should contain the path of a file containing the image to be used by contool when it is flashing its icon.  The image should have been produced using iconedit(1).  The image will be alternated with the "Flash" image to
  138. produce a blinking effect.
  139. X
  140. XIf this field is blank, the default icon is used.
  141. X# 
  142. X:flash_icon
  143. XThe "Flash" icon text field should contain the path of a file containing the image to be used by contool when it is flashing its icon.  The image should have been produced using iconedit(1).  The image will be alternated with the "Check console" image to
  144. produce a blinking effect.
  145. X
  146. XIf this field is blank, the default icon is used.
  147. X# 
  148. X:stamp_resolution
  149. XThe Timestamp resolution numeric text item specifies the number of seconds that must elapse before contool will write a new timestamp to the console.  Even if a filter requires that a timestamp be written, the stamp will only be inserted if the specified
  150. time has transpired.  This keeps the console from becoming clogged with a large number of similar timestamps.
  151. X# 
  152. X:message2
  153. XThe Timestamp resolution numeric text item specifies the number of seconds that must elapse before contool will write a new timestamp to the console.  Even if a filter requires that a timestamp be written, the stamp will only be inserted if the specified
  154. time has transpired.  This keeps the console from becoming clogged with a large number of similar timestamps.
  155. X# 
  156. X:max_message
  157. XThe Maximum message text numeric field determines the maximum number of characters contool will keep in the console display.  If inserting a new message would exceed this amount, contool will remove text from the beginning fo the display to make room. 
  158. The amount of text removed is determined by the "Overflow deletion amount" value.
  159. X# 
  160. X:message3
  161. XThe Maximum message text numeric field determines the maximum number of characters contool will keep in the console display.  If inserting a new message would exceed this amount, contool will remove text from the beginning fo the display to make room. 
  162. The amount of text removed is determined by the "Overflow deletion amount" value.
  163. X# 
  164. X:delete_amount
  165. XThe Overflow deletion amount numeric field determines how much text will be removed from the start of the console to make room for a new message whose insertion would cause the console the exceed the "Maximum message text" size.
  166. X
  167. XContool will attempt to remove whole messages from the console in order to retain an orderly appearance.
  168. X# 
  169. X:message4
  170. XThe Overflow deletion amount numeric field determines how much text will be removed from the start of the console to make room for a new message whose insertion would cause the console the exceed the "Maximum message text" size.
  171. X
  172. XContool will attempt to remove whole messages from the console in order to retain an orderly appearance.
  173. X# 
  174. X:props_apply
  175. XThe Apply button causes the values displayed in the Properties dialog to become the current contool properties.  Before Apply is pressed, changes made in this dialog do not affect contool.
  176. X
  177. XEven after pressing Apply, the changes are not written to the contool configuration file.  If you wish your changes to remaina cross invocations of contool, use the "Save Configuration" dialog to write the properties to the configuration file.
  178. X# 
  179. X:props_reset
  180. XThe Reset button restores the values in the Properties dialog to match the current values in use by contool.  Any changes made to these values and not applied to contool are discarded.
  181. X# 
  182. X:filter_controls
  183. XThis is the contool filter editing dialog.  You use this dialog to add, delete, and modify console message filters.
  184. X# 
  185. X:filter_list
  186. XThis scrolling list displays the current contool filter set.  Each line corresponds to one filter.
  187. X
  188. XThe starting pattern for each filter is shown in the list, preceded by a small glyph which indicates whether the filter is a single-line or multi-line filter.
  189. X
  190. XTo see the other attributes of a single filter, select that filter with the mouse.  The attributes will be displayed in the Filter dialog box.
  191. X
  192. XIf you select more than one filter, the remainder of the dialog box will be grayed out.  The dialog box is also disabled if no filter is selected.
  193. X# 
  194. X:filter_insert
  195. XThe Insert button inserts a new, blank filter into the filter list.  The menu associated with the button allows you to specify where the new filter will be inserted.
  196. X
  197. XThe insert positions are at the top of the list, the bottom of the list, and before or after the current selection.  These last choices are only enabled if exactly one filter in the list is selected.  The default position is at the bottom of the list.
  198. X
  199. XAfter inserting the new filter, any other selected filters are deselected, and the new filter is selected.  You can then define the attributes of this new filter, and update the filter using the Update button.
  200. X# 
  201. X:filter_edit
  202. XThe Edit button lets you modify the current filter list.  The menu associated with this button provides Cut, Copy, Paste, and Delete operations.
  203. X
  204. XThe Cut operation removes the selected filters from the list and places them on the clipboard.  You can place these filters back into the list using the Paste operation.
  205. X
  206. XThe Copy operation places a copy of the selected filters onto the clipboard.  The Paste operation will paste the copied filters into the list.
  207. X
  208. XThe Paste operation pastes filters on the clipboard into the filter list.  The Paste submenu provides four posting positions: at the top of the list, the bottom of the list, and before or after the current selection.  The last two choices are only enabled
  209. if exactly one filter in the list is selected.  The default position is at the bottom of the list.
  210. X
  211. XThe Delete operation removes the selected filters from the list.  The filters are not placed on the clipboard.  Once deleted, filters cannot be recovered with the Paste operation.
  212. X
  213. XThe Cut, Copy, and Delete operations are only enabled when one or more filters in the list are selected.  The Paste operation is only enabled after a Cut or Copy operation has placed filters on the clipboard.
  214. X
  215. XThe default edit operation is Cut.
  216. X# 
  217. X:filter_update
  218. XThe Update button applies the current filter attributes displayed in the Filters dialog box to the currently selected filter.  The only way to modify a filter is to select it, change its attributes, and click the Update button.
  219. X
  220. XThe Update button is only enabled when exactly one filter in the list is selected.
  221. X
  222. XYou must use Update to make changes to a filter take effect.  Clciking the Apply button does not perform an Update function on the current filter.
  223. X# 
  224. X:filter_type
  225. XThe Type setting determines whether the currently selected filter will match one or several lines of text written to the console.
  226. X
  227. XIf "Single line filter" is selected, the "Pattern" text field is enabled, and must contain a regular expression describing the line of text to be matched by this filter.
  228. X
  229. XIf "Multi-line filter" is selected, both "Pattern" and "End pattern" are enabled.  The "Pattern" field should contain a pattern which will match the first line of a multi-line filter.  The "End pattern" must match the last line of the multi-line filter. 
  230. All text between the first and last lines is considered part of the filtered text.
  231. X# 
  232. X:start
  233. XThe Pattern text field contains a regular expression (see ed(1), for more on regular expressions) which will match the first line of a message written to the console.  For single line filters, this is the only line matched by the filter.  For multi-line
  234. filters, lines of text beginning with the first line and continuing until a line matches the "End pattern" are considered part of the filtered text.
  235. X# 
  236. X:stop
  237. XThe End pattern text field contains a regular expression (see ed(1) for more on regular expressions) which will match the last line of a multi-line filter.
  238. X# 
  239. X:comment
  240. XThe Comment text field should contain a short description of what the current filter does.  Since some filters can be quite arcane, this description can be helpful to new users.
  241. X
  242. XThis field is optional, and can be left empty.  Let your conscience be your guide...
  243. X# 
  244. X:ignore
  245. XThe When matched selection determines what contool does with a message once it has matched a filter.
  246. X
  247. XIf "Save message" is selected, the actions selected in the "When saved" setting are performed, and the message text is written to the  console.
  248. X
  249. XIf "Ignore message" is selected, "When saved" is disabled and the message text is discarded.
  250. X# 
  251. X:action
  252. XThe When saved setting determines what action contool will take when a particular filter matches a console message.
  253. X
  254. XIf "Beep" is selected, the machine bell will be rung the indicated number of times.
  255. X
  256. XIf "Command" is selected, the indicated command will be executed.  The contents of the message are written to the command's standard input.
  257. X
  258. XIf "Flash icon" is selected, contool's icon will flash, alternating between the "Check console" and "Flash" images specified in the contool Properties dialog box.
  259. X
  260. XIf "Open window" is selected, contool will open to a window (if iconic) and move in front of any obscuring windows.
  261. X
  262. XIf "Timestamp" is selected, a timestamp will be written to the console before the message text.  Timestamping is further controlled by the timestamp resolution defined in the contool Properties dialog box.
  263. X
  264. XWhen a new filter is created, the save actions are set to match the default message actions defined in the Properties dialog box.
  265. X# 
  266. X:filter_beep_count
  267. XThis numeric text field determines the number of times the terminal bell will be rung when a message arrives matching the current filter.
  268. X
  269. XThis item is only enabled if "When matched" is set to "Save message" and "Beep" is enabled in the "When saved" setting.
  270. X# 
  271. X:filter_beep_times
  272. XThis numeric text field determines the number of times the terminal bell will be rung when a message arrives matching the current filter.
  273. X
  274. XThis item is only enabled if "When matched" is set to "Save message" and "Beep" is enabled in the "When saved" setting.
  275. X# 
  276. X:filter_command
  277. XThis text field determines the command that will be exedcuted when a message arrives matching the current filter.  The contents of the message are written to standard input of the executing command.
  278. X
  279. XThis item is only enabled if "When matched" is set to "Save message" and "Command" is enabled in the "When saved" setting.
  280. X# 
  281. X:filters_apply
  282. XThe Apply button takes the set of filters displayed in the filter list and makes them the current contool filter set.  Before Apply is pressed, any additions, deletions, or changes made to the filters remain local to the Filters dialog box.
  283. X
  284. XEven after pressing Apply, the filter changes are not written to the configuration file.  In roder to make your changes take effect for subsequent invocations of contool, use the Save Configuration dialog box to write them to your configuration file.
  285. X# 
  286. X:filters_reset
  287. XThe Reset button discards any changes you have made to the displayed filter set, restoring the filters to match the set currently in use by contool.
  288. X
  289. XChanges made to the filters are local to the Filters dialog box.  You can discard your work and start fresh with the existing filter set by pressing the Reset button.
  290. X# 
  291. X:load_controls
  292. XThe Load Configuration dialog lets the user load tool properties and/or filter definitions from a configuration file.
  293. X# 
  294. X:load_type
  295. XThe Load selection lets the user choose which items are to be loaded from the configuration file.
  296. X
  297. XIf "Tool properties" is selected, contool properties will be loaded from the file.
  298. X
  299. XIf "Filter definitions" is selected, new filters will be loaded from the file, replacing any existing filters.
  300. X# 
  301. X:load_file
  302. XThe Configuration file text field must contain the name of the desired configuration file.
  303. X
  304. XTyping a space in this field will cause file name completion to occur, expanding the current pathname to match, as much as possible, any existing files with the same name.
  305. X# 
  306. X:accept_load
  307. XThe Load button causes the selected items to be read from the configuration file.  Existing properties and/or filters are replaced by those read from the file.
  308. X# 
  309. X:store_controls
  310. XThe Store Configuration dialog lets the user store tool properties and/or filter definitions in a configuration file.
  311. X# 
  312. X:store_type
  313. XThe Store selection lets the user choose which items are to be stored in the configuration file.
  314. X
  315. XIf "Tool properties" is selected, contool properties will be written to the file.
  316. X
  317. XIf "Filter definitions" is selected, new filters will be written to the file.
  318. X# 
  319. X:store_file
  320. XThe Configuration file text field must contain the name of the desired configuration file.
  321. X
  322. XTyping a space in this field will cause file name completion to occur, expanding the current pathname to match, as much as possible, any existing files with the same name.
  323. X# 
  324. X:accept_store
  325. XThe Store button writes the desired items to the configuration file.  The entire file is overwritten with the data.  Thus, a file containing properties and filters will be completely rewritten, even if you only write the filters to it.
  326. END_OF_FILE
  327. if test 18660 -ne `wc -c <'contool.info'`; then
  328.     echo shar: \"'contool.info'\" unpacked with wrong size!
  329. fi
  330. # end of 'contool.info'
  331. fi
  332. if test -f 'contool.man' -a "${1}" != "-c" ; then 
  333.   echo shar: Will not clobber existing file \"'contool.man'\"
  334. else
  335. echo shar: Extracting \"'contool.man'\" \(17253 characters\)
  336. sed "s/^X//" >'contool.man' <<'END_OF_FILE'
  337. X.TH CONTOOL 1 "13 October 1989"
  338. X.SH NAME
  339. Xcontool \- capture and display console output
  340. X.SH SYNOPSIS
  341. Xcontool [\fB\(hyf\fP \fIfile\fP] [\fB\(hyl\fP] [\f3\(hyL\fP \f2logfile\fP]
  342. X.SH DESCRIPTION
  343. X.LP
  344. X\f2Contool\fP captures and displays any messages sent to the system console.
  345. XEach message is timestamped as it arrives.  The messages are displayed in a
  346. Xscrolling text window, so the user can scroll through old messages.
  347. X.LP
  348. XWhen a message arrives, \f3contool\fP will beep and, if closed, begin
  349. Xblinking its icon until the user opens the tool.  This behavior can be changed
  350. Xby modifying the default contool properties.
  351. X.LP
  352. X\f2Contool\fP must be run under either Open Windows or X Windows.
  353. XIt accepts the standard Open Windows command line options.
  354. X.SH OPTIONS
  355. X.IP "\fB\\(hyf\fP \fIfile\fP"
  356. Xspecifies an alternate configuration file.  \f2Contool\fP normally
  357. Xreads its configuration information from ~/.contool.
  358. X.IP "\fB\\(hyl\fP"
  359. Xenables logging when \f2contool\fP starts.  Initially, \f2contool\fP
  360. Xdoes not log messages to a file.  This option allows logging to be started
  361. Xautomatically.  Logging behavior can be enabled and disabled via the
  362. X\*(lqFile\*(rq menu (see below).
  363. X.IP "\fB\\(hyL\fP \fIlogfile\fP"
  364. Xspecifies an alternate log file.  The value of \fIlogfile\fP overrides
  365. Xany log file stored in the configuration file.  The \fB-l\fP and \fB-L\fP
  366. Xoptions used together allow multiple copies of contool to be started on 
  367. Xa single machine, with each copy logging to a different file, without
  368. Xhaving to create and maintain multiple configuration files.
  369. X.SH USER INTERFACE
  370. X.LP
  371. X\f2Contool\fP presents the user with a control panel containing three
  372. Xbuttons and a scrolling text window.  Console messages appear in the
  373. Xtext window; \f2contool\fP's behavior is managed with the \fBFile\fP,
  374. X\fBView\fP, and \fBEdit\fP buttons.  These buttons have several menu choices
  375. Xassociated with them:
  376. X.IP "\fBFile: Load Configuration...\fP"
  377. Xbrings up the \fBLoad Configuration\fP dialog box.  This dialog contains
  378. Xa non-exclusive setting, a text field, and a single \fBLoad\fP button.
  379. XThe setting has two entries: \*(lqTool Properties\*(rq and \*(lqFilter
  380. XDefinitions\*(rq.  The user can choose which of these items to load from
  381. Xthe configuration file.  The default action is to load both properties and
  382. Xfilters from the file.
  383. X.IP ""
  384. XThe text field contains the path of the configuration file.  By default,
  385. Xthis is either ~/.contool, or the value of the \fB-f\fP option (above).
  386. XThis text field provides file name completion, like \f2csh\fP(1), by typing
  387. Xa space or carriage return.
  388. X.IP ""
  389. XAfter determining which components to be read from the file, and the name of
  390. Xthe file, clicking on the \fBLoad\fP button will cause the desired elements
  391. Xto be read from the file.  If filters are loaded, any existing filters are
  392. Xdiscarded.  If \f2contool\fP was in the middle of filtering a multi-line message,
  393. Xthat filtering action is terminated.
  394. X.IP ""
  395. X\f2Contool\fP can read files created by versions 2.0, 2.1, 2.2, and 3.0 of
  396. X\f2contool\fP.  Files used by version 1.0 will need to be manually converted
  397. Xby first reading and writing them with any 2.x release of \f2contool\fP.
  398. X.IP "\fBFile: Save Configuration...\fP"
  399. Xis analogous to the \fBLoad Configuration\fP operation, bringing up a dialog
  400. Xbox containing a non-exclusive setting, a text field, and a \fBSave\fP
  401. Xbutton.  In the same manner as the \fBLoad Configuration\fP dialog, the
  402. Xuser indiactes which items he desires to save, specifies the destination
  403. Xfile, and clicks on the \fBSave\fP button to save the information.
  404. X.IP ""
  405. X\f2Contool\fP writes the data in a format incompatible with previous
  406. Xversions (release 2.2 or earlier) of the tool.
  407. X.IP "\fBFile: Start Logging\fP"
  408. Xstarts logging console messages to the log file specified by the tool
  409. Xproperties, or the \fB-L\fP option (above).  The tool properties also
  410. Xcontains a switch which determines whether messages are written before
  411. Xor after filtering occurs.  If before, all messages are logged.  If after,
  412. Xonly those messages which do not match a filter, or whose filter has the
  413. X\*(lqSave\*(rq attribute, are logged.
  414. X.IP ""
  415. XThe log file is written in such a manner that multiple invocations of
  416. X\f2contool\fP can write to the same log file without conflict.  New 
  417. Xmessages are always appended to the log file.
  418. X.IP "\fBFile: Stop Logging\fP"
  419. Xstops the logging process.
  420. X.IP "\fBFile: Print\fP"
  421. Xuses the \*(lqPrint Filter\*(rq specified in the tool properties to 
  422. Xprint the contents of the console.  Only messages saved in the console
  423. Xcan be printed.
  424. X.IP "\fBView: Become Console\fP"
  425. Xensures that \f2contool\fP has the system console attribute.  SunOS
  426. Xallows exactly one process in the system to own the console.  If some
  427. Xother process takes control of the console, the user can reassign the
  428. Xconsole attribute to \f2contool\fP using this menu selection.
  429. X.IP "\fBView: Clear Messages\fP"
  430. Xclears all messages from the console text display.
  431. X.IP "\fBView: Reset Filter\fP"
  432. Xinterrupts filtering of a multi-line filter.  If the user incorrectly
  433. Xspecifies the end pattern of a multi-line filter, \f2contool\fP may
  434. Xnever stop processing the filter, causing all subsequent console
  435. Xmessages to be incorrectly handled.  This selection resets the effect
  436. Xof any multi-line filter that may be in effect.
  437. X.IP ""
  438. XWhen processing a multi-line filter, \f2contool\fP displays the
  439. Xstarting filter pattern in the left window footer.  If the left footer
  440. Xis blank, \f2contool\fP is not processing a multi-line filter.
  441. X.IP "\fBEdit: Filters...\fP"
  442. Xbrings up the \fBFilters\fP dialog box.  See EDITING FILTERS, below.
  443. X.IP "\fBEdit: Properties...\fP"
  444. Xbrings up the \fBTool Properties\fP dialog box.  See TOOL PROPERTIES, below.
  445. X.SH EDITING FILTERS
  446. XThe \fBFilters\fP dialog presents a scrolling list of filters and a variety of
  447. Xdevices used to modify the current filter set.  The items in this dialog are:
  448. X.IP "\fBFilters\fP"
  449. XThis scrolling list shows the starting pattern of each filter currently used by
  450. X\f2contool\fP.  The pattern text is preceded by a small glyph indicating
  451. Xwhether the filter is a single-line or multi-line filter.
  452. X.IP ""
  453. XIf exactly one item in the list is selected, the properties of that filter
  454. Xwill be displayed in the dialog box.  If no, or more than one, filter is
  455. Xselected, the remainder of the dialog box is grayed out.
  456. X.IP "\fBInsert\fP"
  457. XThis button inserts a new blank filter into the scrolling list, allowing
  458. Xthe user to add new filters to the filter set.  A menu attached to
  459. Xthe button allows the user to select the insert point: at the top of the
  460. Xlist, before the current selection, after the current selection, or at
  461. Xthe bottom of the list.  The \*(lqbefore\*(rq and \*(lqafter\*(rq
  462. Xchoices are only enabled if exactly one filter in the list is selected.
  463. XThe default position is the bottom of the list.
  464. X.IP "\fBEdit\fP"
  465. XThis button edits the currently selected filters in the list.  The
  466. Xmenu attached to this button has four choices: \fBCut\fP, \fBCopy\fP, \fBPaste\fP,
  467. Xand \fBDelete\fP.
  468. X.IP ""
  469. XThe \fBCut\fP operation removes the selected filters from the list
  470. Xand places them on the clipboard, where they can subsequently be pasted
  471. Xback into the list.
  472. X.IP ""
  473. XThe \fBCopy\fP operation copies the selected filters to the clipboard.
  474. XThe filters are not removed from the list.  The copied filters can subsequently
  475. Xbe pasted back into the list.
  476. X.IP ""
  477. XThe \fBPaste\fP operation copies filters from the clipboard into the list.
  478. XThis selection has a menu which specifies the paste position: at the top of the
  479. Xlist, before the current selection, after the current selection, or at
  480. Xthe bottom of the list.  The \*(lqbefore\*(rq and \*(lqafter\*(rq
  481. Xchoices are only enabled if exactly one filter in the list is selected.
  482. XThe default position is the bottom of the list.
  483. X.IP ""
  484. XThe \fBDelete\fP operation removes the selected filters from the list
  485. Xwithout placing them on the clipboard.  Once deleted, filters cannot
  486. Xbe recovered with a paste operation.
  487. X.IP ""
  488. XThe \fBCut\fP, \fBCopy\fP, and \fBDelete\fP selections are only presented
  489. Xif one or more filters in the list are selected.  The \fBPaste\fP selection
  490. Xis only available after a \fBCut\fP or \fBCopy\fP operation.
  491. X.IP "\fBUpdate\fP"
  492. XThis button updates the currently selected filter using the values 
  493. Xpresented in the remainder of the dialog box.  This button is only
  494. Xaccessible if exactly one filter in the list is selected.
  495. X.IP ""
  496. X\fBUpdate\fP is used to modify an existing filter.  When just that filter
  497. Xis selected, its attributes are placed into the other dialog elements
  498. Xdescribed below.  After adjusting the filter attributes, the user clicks
  499. Xthe \fBUpdate\fP button to apply the changes to the currently selected
  500. Xfilter.
  501. X.IP ""
  502. XIn a similar manner, \fBUpdate\fP is used to apply attributes to a new,
  503. Xblank filter placed in the list via the \fBInsert\fP button.
  504. X.IP "\fBType\fP"
  505. XThe \fBType\fP toggle indicates whether a filter will match just a single
  506. Xline message, or will match a multiple line message.  When \*(lqSingle
  507. Xline filter\*(rq is chosen, the \fBEnd pattern\fP item is disabled,
  508. Xand the user must specify the pattern which will match a single line of
  509. Xtext written to the console.  When \*(lqMulti-line filter\*(rq is
  510. Xselected, the \fBEnd pattern\fP item is enabled, and the user needs to specify
  511. Xboth a starting and an ending pattern.  All text following a line which
  512. Xmatches the starting pattern, up to and including a line which matches the
  513. Xending pattern, is considered to be part of the filtered message.
  514. X.IP "\fBPattern\fP"
  515. XThis text field specifies the regular expression which matches the first
  516. X(and, in the case of single line filters, the only) line of text in the
  517. Xfiltered message.  Any valid regular expression is permitted.  Users that
  518. Xare trying to match some text exactly should be aware that regular
  519. Xexpressions can match text anywhere in a line, and that the expression
  520. Xshould be anchored to the start (or end) of the line by using the "^"
  521. X(or "$") metacharacters.  For more information on regular expressions,
  522. Xsee \f2ed\fP(1).
  523. X.IP "\fBEnd pattern\fP"
  524. XIf the \fBType\fP is set to \*(lqMulti-line filter\*(rq, this field
  525. Xmust contain the regular expression which matches the last line of the
  526. Xblock of text handled by this filter.
  527. X.IP "\fBComment\fP"
  528. XThis text field contains any comments regarding the filter the user
  529. Xwishes to record.  Since some filters can be rather arcane, it is suggested
  530. Xthat users comment their filters.
  531. X.IP "\fBWhen matched\fP"
  532. XThis exclusive setting dictates the behavior of \f2contool\fP when a
  533. Xfilter is matched.  If \*(lqSave message\*(rq is chosen, the message
  534. Xis copied into the console display, and various actions can be taken.
  535. XIf \*(lqIgnore message\*(rq is selected, the filter text is discarded
  536. Xand no further actions are taken by \f2contool\fP.
  537. X.IP "\fBWhen saved\fP"
  538. XIf \fBWhen matched\fP is set to \*(lqSave message\*(rq, this non-exclusive
  539. Xchoice item will be enabled, allowing the user to specify what contool
  540. Xshould do with this message.
  541. X.IP ""
  542. XThe \*(lqBeep\*(rq choice causes the terminal bell to be sounded.  If
  543. Xselected, the beep counter to the right of this item is enabled, allowing
  544. Xthe user to choose anywhere from one brief beep up to 99 annoying beeps.
  545. X.IP ""
  546. XThe \*(lqCommand\*(rq choice causes a single command to be executed.
  547. XThe text field to the right of this item must contain the command to
  548. Xbe executed.  \f2Contool\fP will write the text of the message to the
  549. Xstandard input of the command.  For example, using \*(lqmail -s 'Contool
  550. Xoutput' user\*(rq as the command would mail the message text to the
  551. X\f2user\fP.
  552. X.IP ""
  553. XThe \*(lqFlash icon\*(rq choice causes the \f2contool\fP icon to flash,
  554. Xalternating between the \*(lqCheck console\*(rq and \*(lqFlash\*(rq
  555. Xicons.
  556. X.IP ""
  557. XThe \*(lqOpen window\*(rq choice causes \f2contool\fP to open from
  558. Xits iconic state, and to move in front of any obscuring windows.
  559. X.IP ""
  560. XThe \*(lqTimestamp\*(rq choice causes \f2contool\fP to write a timestamp
  561. Xto the console before copying the message into the console.  The timestamp
  562. Xis written in conjunction with the timestamp resolution specified in the
  563. X\fBTool Properties\fP dialog.
  564. X.IP "\fBApply\fP"
  565. XThis button makes the filters contained in the scrolling list the current
  566. Xset of active filters.  Until this button is clicked, all changes made to
  567. Xthe filters are not used by \f2contool\fP.  After clicking \fBAccept\fP,
  568. Xthe changed filters become the current working set.
  569. X.IP ""
  570. XNote that even after clicking \fBAccept\fP, the configuration file is
  571. Xnot updated.  To make the changes permanent between invocations of
  572. X\f2contool\fP, use the \fBSave Configuration\fP dialog to save the
  573. Xchanged filters.
  574. X.IP "\fBReset\fP"
  575. XThis button discards any changes made to the current filter set, 
  576. Xrestoring the filter list to match the current filter set in use
  577. Xby \f2contool\fP.
  578. X.SH TOOL PROPERTIES
  579. XThe \fBTool Properties\fP dialog allows the user to change the default behavior
  580. Xof \f2contool\fP.  This includes various tool attributes, and the 
  581. Xactions taken when a message arrives which does not match any filter.
  582. XThe various properties include:
  583. X.IP "\fBDefault action\fP"
  584. XThis non-exclusive setting determines the actions taken by \f2contool\fP
  585. Xwhen a message arrives which does not match any filter.  The various
  586. Xchoices in this setting exactly correspond to the \fBWhen saved\fP
  587. Xsetting the \fBFilters\fP dialog, above.
  588. X.IP "\fBLog file\fP
  589. XThis text field contains the path of the file to which messages will
  590. Xbe logged.  This field must be filled in before logging is enabled.
  591. X.IP "\fBLog messages\fP"
  592. XIf this exclusive setting is set to \*(lqbefore filtering\*(rq, all
  593. Xmessages will be logged.  If set to \*(lqafter filtering\*(rq, 
  594. Xmessages that match filters whose \fBWhen matched\fP behavior is
  595. Xset to \*(lqIgnore message\*(rq will not be logged.
  596. X.IP "\fBPrint filter\fP"
  597. XThis text field specifies the command to be used to print the
  598. Xconsole.  The default is \*(lqlpr\*(rq.  Local site dependencies
  599. Xmay require a different command.
  600. X.IP "\fB\\*(lqAll is well\\*(rq icon\fP"
  601. XThis text field contains the path of a file created with \f2iconedit\fP(1).
  602. XThe contained image will be used as \f2contool\fP's regular icon image.
  603. XThis image is displayed whenever no flashing is in effect.
  604. X.IP "\fB\\*(lqCheck console\\*(rq icon\fP"
  605. XThis image is alternated with the \fB\*(lqFlash\*(rq icon\fP image whenever flashing
  606. Xis required.
  607. X.IP "\fB\\*(lqFlash\\*(rq icon\fP"
  608. XThis image is alternated with the \fB\*(lqCheck console\*(rq icon\fP image whenever flashing
  609. Xis required.  Ideally, all three icons should be the same size.
  610. X.IP "\fBTimestamp resolution\fP"
  611. XThis numeric field specifies the minimum number of seconds to wait before
  612. Xwriting a new timestamp to the console.  Messages which require timestamping
  613. Xwill only write a timestamp if this number of seconds have transpired since the
  614. Xlast timestamp.
  615. X.IP "\fBMaximum message text\fP"
  616. XThis numeric field determines the maximum size, in bytes, of messages that will
  617. Xbe stored in the console.  When writing a message to the console would exceed
  618. Xthis limit, some number of bytes, as determined by the \fBOverflow delete amount\fP,
  619. Xbelow, will be removed from the front of the console.  This feature prevents the
  620. Xconsole from becoming so large over time that it begins to swamp system resources.
  621. X.IP "\fBOverflow delete amount\fP"
  622. XWhen writing a message to the console would exceed the \fBMaximum message text\fP,
  623. Xabove, text will be deleted from the beginning of the console to make room.
  624. XThis numeric field specifies how many bytes to remove to make room.  \f2Contool\fP
  625. Xwill attempt to remove whole messages within the constraints of the console
  626. Xsize to preserve a readable console.
  627. X.IP "\fBApply\fP"
  628. XThis button makes the values in the dialog box the
  629. Xcurrent tool properties.  Until this button is clicked, all changes made to
  630. Xthe properties are not used by \f2contool\fP.  After clicking \fBAccept\fP,
  631. Xthe changed values become the current properties.
  632. X.IP ""
  633. XNote that even after clicking \fBAccept\fP, the configuration file is
  634. Xnot updated.  To make the changes permanent between invocations of
  635. X\f2contool\fP, use the \fBSave Configuration\fP dialog to save the
  636. Xchanged properties.
  637. X.IP "\fBReset\fP"
  638. XThis button discards any changes in the dialog box made to the current properties, 
  639. Xrestoring the properties to match the current properties in use
  640. Xby \f2contool\fP.
  641. X.SH CONFIGURATION FILE FORMAT
  642. XPrevious versions of \f2contool\fP relied on the user editing the
  643. Xconfiguration file by hand.  This version manages the file automatically,
  644. Xand it is not intended that the file be edited directly by users.
  645. XSee EDITING FILTERS, above, for information on modifying the behavior
  646. Xof \f2contool\fP.
  647. X.SH FILES
  648. X.ta 2i
  649. X~/.contool    filter pattern file
  650. X.SH SEE ALSO
  651. Xcmdtool(1), ed(1)
  652. X.SH AUTHOR
  653. X.LP
  654. XChuck Musciano
  655. X.br
  656. XAdvanced Technology Department
  657. X.br
  658. XHarris Corporation
  659. X.br
  660. XPO Box 37, MS 3A/1912
  661. X.br
  662. XMelbourne, FL 32902
  663. X.br
  664. X(407) 727-6131
  665. X.br
  666. XARPA: chuck@trantor.harris-atd.com
  667. X.SH BUGS
  668. X.LP
  669. X\f2Contool\fP is a view-only tool, and there is no way to type commands
  670. Xon the console.
  671. X.LP
  672. XWindow system bugs may cause unusual, but harmless, quirks in the behavior
  673. Xof \f2contool\fP.  In particular, displaying a menu in a dialog box without
  674. Xactually selecting an item from that menu will cause the dialog box to close.
  675. END_OF_FILE
  676. if test 17253 -ne `wc -c <'contool.man'`; then
  677.     echo shar: \"'contool.man'\" unpacked with wrong size!
  678. fi
  679. # end of 'contool.man'
  680. fi
  681. if test -f 'props.c' -a "${1}" != "-c" ; then 
  682.   echo shar: Will not clobber existing file \"'props.c'\"
  683. else
  684. echo shar: Extracting \"'props.c'\" \(8606 characters\)
  685. sed "s/^X//" >'props.c' <<'END_OF_FILE'
  686. X/************************************************************************/
  687. X/*    Copyright 1988-1990 by Chuck Musciano and Harris Corporation    */
  688. X/*                                    */
  689. X/*    Permission to use, copy, modify, and distribute this software    */
  690. X/*    and its documentation for any purpose and without fee is    */
  691. X/*    hereby granted, provided that the above copyright notice    */
  692. X/*    appear in all copies and that both that copyright notice and    */
  693. X/*    this permission notice appear in supporting documentation, and    */
  694. X/*    that the name of Chuck Musciano and Harris Corporation not be    */
  695. X/*    used in advertising or publicity pertaining to distribution    */
  696. X/*    of the software without specific, written prior permission.    */
  697. X/*    Chuck Musciano and Harris Corporation make no representations    */
  698. X/*    about the suitability of this software for any purpose.  It is    */
  699. X/*    provided "as is" without express or implied warranty.  This     */
  700. X/*    software may not be sold without the prior explicit permission    */
  701. X/*    of Harris Corporation.                        */
  702. X/************************************************************************/
  703. X
  704. X/************************************************************************/
  705. X/*                                    */
  706. X/*    props.c        contool properties dialog manager        */
  707. X/*                                    */
  708. X/************************************************************************/
  709. X
  710. X#include    <stdio.h>
  711. X#include    <sys/param.h>
  712. X#include    <sys/types.h>
  713. X#include    <xview/xview.h>
  714. X#include    <xview/panel.h>
  715. X#include    <xview/rect.h>
  716. X#include    <xview/screen.h>
  717. X
  718. X#include    "manifest.h"
  719. X#include    "contool.h"
  720. X#include    "contool_ui.h"
  721. X
  722. XEXPORT    Props    defaults = {3,        /* beeps             */
  723. X                TRUE,    /* flash the icon         */
  724. X                FALSE,    /* don't pop the window         */
  725. X                TRUE,    /* timestamp the message     */
  726. X                NULL,    /* no command to run         */
  727. X                NULL,    /* default good icon         */
  728. X                NULL,    /* default bad icon         */
  729. X                NULL,    /* default flash icon         */
  730. X                "lpr",    /* default print filter         */
  731. X                NULL,    /* no log file             */
  732. X                TRUE,    /* log after filtering         */
  733. X                60,        /* timestamp every 60 seconds     */
  734. X                32768,    /* save 32K of messages         */
  735. X                1024    /* remove 1K when we get full     */
  736. X               };
  737. X
  738. XPRIVATE    contool_props_objects    *contool_props = NULL;
  739. X
  740. X/************************************************************************/
  741. XPRIVATE    init_props(ip)
  742. X
  743. Xcontool_props_objects    *ip;
  744. X
  745. X{    int    val;
  746. X
  747. X    val = 0;
  748. X    if (defaults.beep > 0)
  749. X       val |= BEEP_BIT;
  750. X    if (defaults.command > 0)
  751. X       val |= COMMAND_BIT;
  752. X    if (defaults.flash)
  753. X       val |= FLASH_BIT;
  754. X    if (defaults.open)
  755. X       val |= OPEN_BIT;
  756. X    if (defaults.stamp > 0)
  757. X       val |= STAMP_BIT;
  758. X    xv_set(ip->default_action,     PANEL_VALUE,    val,                       NULL);
  759. X    xv_set(ip->default_beep_count, PANEL_VALUE,    defaults.beep,
  760. X                       PANEL_INACTIVE, defaults.beep == 0,        NULL);
  761. X    xv_set(ip->default_beep_times, PANEL_INACTIVE, defaults.beep == 0,        NULL);
  762. X    xv_set(ip->default_command,    PANEL_VALUE,    is_null(defaults.command),
  763. X                       PANEL_INACTIVE, defaults.command == NULL,  NULL);
  764. X    xv_set(ip->log_file,           PANEL_VALUE,    defaults.log_file,         NULL);
  765. X    xv_set(ip->log_style,          PANEL_VALUE,    defaults.log_after,        NULL);
  766. X    xv_set(ip->good_icon,          PANEL_VALUE,    defaults.good_icon,        NULL);
  767. X    xv_set(ip->bad_icon,           PANEL_VALUE,    defaults.bad_icon,         NULL);
  768. X    xv_set(ip->flash_icon,         PANEL_VALUE,    defaults.flash_icon,       NULL);
  769. X    xv_set(ip->print_filter,       PANEL_VALUE,    defaults.print_filter,     NULL);
  770. X    xv_set(ip->max_message,        PANEL_VALUE,    defaults.max_size,         NULL);
  771. X    xv_set(ip->stamp_resolution,   PANEL_VALUE,    defaults.stamp_resolution, NULL);
  772. X    xv_set(ip->delete_amount,      PANEL_VALUE,    defaults.delete_amount,    NULL);
  773. X}
  774. X
  775. X/************************************************************************/
  776. XEXPORT    Menu_item    edit_properties(item, op)
  777. X
  778. XMenu_item    item;
  779. XMenu_generate    op;
  780. X
  781. X{    contool_base_objects    *ip = (contool_base_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  782. X
  783. X    if (op == MENU_NOTIFY) {
  784. X       xv_set(ip->base, FRAME_BUSY, TRUE, NULL);
  785. X       if (contool_props == NULL) {
  786. X          contool_props = contool_props_objects_initialize(NULL, ip->base);
  787. X          xv_set(contool_props->log_file,
  788. X                      PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
  789. X                      PANEL_NOTIFY_STRING, "\n\r ",
  790. X                   NULL);
  791. X          xv_set(contool_props->good_icon,
  792. X                      PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
  793. X                      PANEL_NOTIFY_STRING, "\n\r ",
  794. X                   NULL);
  795. X          xv_set(contool_props->bad_icon,
  796. X                      PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
  797. X                      PANEL_NOTIFY_STRING, "\n\r ",
  798. X                   NULL);
  799. X          xv_set(contool_props->flash_icon,
  800. X                      PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
  801. X                      PANEL_NOTIFY_STRING, "\n\r ",
  802. X                   NULL);
  803. X          place_dialog(ip->base, contool_props->props);
  804. X          }
  805. X       init_props(contool_props);
  806. X       xv_set(contool_props->props, XV_SHOW, TRUE, NULL);
  807. X       xv_set(ip->base, FRAME_BUSY, FALSE, NULL);
  808. X       }
  809. X    return item;
  810. X}
  811. X
  812. X/************************************************************************/
  813. XEXPORT    void    default_action(item, value, event)
  814. X
  815. XPanel_item    item;
  816. Xunsigned int    value;
  817. XEvent        *event;
  818. X
  819. X{    contool_props_objects    *ip = (contool_props_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  820. X    
  821. X    xv_set(ip->default_beep_count, PANEL_INACTIVE, !(value & BEEP_BIT), NULL);
  822. X    xv_set(ip->default_beep_times, PANEL_INACTIVE, !(value & BEEP_BIT), NULL);
  823. X    xv_set(ip->default_command,    PANEL_INACTIVE, !(value & COMMAND_BIT), NULL);
  824. X}
  825. X
  826. X/************************************************************************/
  827. XEXPORT    void    accept_properties(item, event)
  828. X
  829. XPanel_item    item;
  830. XEvent        *event;
  831. X
  832. X{    contool_props_objects    *ip = (contool_props_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  833. X    Props    new;
  834. X    int    val;
  835. X    Server_image    icon = NULL, load_icon();
  836. X    char    msg[1024];
  837. X
  838. X    val = (int) xv_get(ip->default_action, PANEL_VALUE);
  839. X
  840. X    if (val & BEEP_BIT)
  841. X       new.beep = (int) xv_get(ip->default_beep_count, PANEL_VALUE);
  842. X    else
  843. X       new.beep = 0;
  844. X
  845. X    if (val & COMMAND_BIT) {
  846. X       new.command = (char *) xv_get(ip->default_command, PANEL_VALUE);
  847. X       if (is_empty(new.command)) {
  848. X          error("You must specify a command to be executed");
  849. X          xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  850. X          return;
  851. X          }
  852. X       }
  853. X    else
  854. X       new.command = NULL;
  855. X
  856. X    new.flash            = (val & FLASH_BIT)? TRUE : FALSE;
  857. X    new.open             = (val & OPEN_BIT)? TRUE : FALSE;
  858. X    new.stamp            = (val & STAMP_BIT)? TRUE : FALSE;
  859. X    new.log_file         = (char *) xv_get(ip->log_file,         PANEL_VALUE);
  860. X    new.log_after        = (int)    xv_get(ip->log_style,        PANEL_VALUE);
  861. X    new.good_icon        = (char *) xv_get(ip->good_icon,        PANEL_VALUE);
  862. X    new.bad_icon         = (char *) xv_get(ip->bad_icon,         PANEL_VALUE);
  863. X    new.flash_icon       = (char *) xv_get(ip->flash_icon,       PANEL_VALUE);
  864. X    new.print_filter     = (char *) xv_get(ip->print_filter,     PANEL_VALUE);
  865. X    new.max_size         = (int)    xv_get(ip->max_message,      PANEL_VALUE);
  866. X    new.stamp_resolution = (int)    xv_get(ip->stamp_resolution, PANEL_VALUE);
  867. X    new.delete_amount    = (int)    xv_get(ip->delete_amount,    PANEL_VALUE);
  868. X
  869. X    new.good_icon = is_empty(new.good_icon)? NULL : expand_tilde(new.good_icon);
  870. X    new.bad_icon = is_empty(new.bad_icon)? NULL : expand_tilde(new.bad_icon);
  871. X    new.flash_icon = is_empty(new.flash_icon)? NULL : expand_tilde(new.flash_icon);
  872. X
  873. X    if (new.good_icon && (icon = load_icon(new.good_icon, msg)) == NULL) {
  874. X       error("Invalid \"All is well\" icon: %s", msg);
  875. X       xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  876. X       return;
  877. X       }
  878. X    if (icon)
  879. X       xv_destroy(icon);
  880. X    if (new.bad_icon && (icon = load_icon(new.bad_icon, msg)) == NULL) {
  881. X       error("Invalid \"Check console\" icon: %s", msg);
  882. X       xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  883. X       return;
  884. X       }
  885. X    if (icon)
  886. X       xv_destroy(icon);
  887. X    if (new.flash_icon && (icon = load_icon(new.flash_icon, msg)) == NULL) {
  888. X       error("Invalid \"Flash\" icon: %s", msg);
  889. X       xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  890. X       return;
  891. X       }
  892. X    if (icon)
  893. X       xv_destroy(icon);
  894. X
  895. X    new.log_file = is_empty(new.log_file)? NULL : expand_tilde(new.log_file);
  896. X    new.print_filter = strsave(new.print_filter);
  897. X    new.command = strsave(defaults.command);
  898. X    defaults = new;
  899. X
  900. X    update_icons();
  901. X    update_logging();
  902. X}
  903. X
  904. X/************************************************************************/
  905. XEXPORT    void    reset_properties(item, event)
  906. X
  907. XPanel_item    item;
  908. XEvent        *event;
  909. X
  910. X{    contool_props_objects    *ip = (contool_props_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  911. X    
  912. X    init_props(ip);
  913. X    xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  914. X}
  915. END_OF_FILE
  916. if test 8606 -ne `wc -c <'props.c'`; then
  917.     echo shar: \"'props.c'\" unpacked with wrong size!
  918. fi
  919. # end of 'props.c'
  920. fi
  921. echo shar: End of archive 3 \(of 6\).
  922. cp /dev/null ark3isdone
  923. MISSING=""
  924. for I in 1 2 3 4 5 6 ; do
  925.     if test ! -f ark${I}isdone ; then
  926.     MISSING="${MISSING} ${I}"
  927.     fi
  928. done
  929. if test "${MISSING}" = "" ; then
  930.     echo You have unpacked all 6 archives.
  931.     rm -f ark[1-9]isdone
  932. else
  933.     echo You still need to unpack the following archives:
  934.     echo "        " ${MISSING}
  935. fi
  936. ##  End of shell archive.
  937. exit 0
  938.  
  939. Chuck Musciano                ARPA  : chuck@trantor.harris-atd.com
  940. Harris Corporation             Usenet: ...!uunet!x102a!trantor!chuck
  941. PO Box 37, MS 3A/1912            AT&T  : (407) 727-6131
  942. Melbourne, FL 32902            FAX   : (407) 727-{5118,5227,4004}
  943.  
  944. I'm glad you asked, son.  Being popular
  945.     is the most important thing in the world.    -- Homer Simpson
  946.